<template>
  <div class="black-list">
    <el-table :data="dataarr" border style="width: 100%">
      <el-table-column type="selection" width="45"></el-table-column>
      <el-table-column prop="blackDate" label="拉黑时间" width="150"></el-table-column>
      <el-table-column prop="ptName" label="平台" width="120"></el-table-column>
      <el-table-column prop="storeName" label="店铺名称" width="120"></el-table-column>
      <el-table-column prop="blackCount" label="拍号" width="240"></el-table-column>
      <el-table-column prop="blackReason" label="拉黑/解除原因"></el-table-column>
      <el-table-column prop="status" label="状态" width="100">
        <template v-slot="{ row }">
          <span v-if="row.isBlack== 2">已拉黑</span>
          <span v-else>待拉黑</span>
        </template>
      </el-table-column>
      <el-table-column>
        <template slot="header">
          <el-button type="danger" size="mini" @click="allDel">批量解除</el-button>
        </template>
        <template v-slot="{ row }">
          <el-button type="primary" size="mini" @click="delItem(row.id)">解除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props: {
    dataarr: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {
      tableData: []
    }
  },
  created() {
    // console.log(this.dataarr)s
  },
  methods: {
    allDel() {
      this.$message({
        message: '!!!  暂无功能',
        type: 'default'
      })
    },
    delItem(id) {}
  }
}
</script>

<style lang="scss" scoped>
.el-table {
  font-size: 12px;
}

.el-button {
  padding: 4px 8px;
}
</style>
